#!/usr/bin/env python
# -*- coding: utf-8 -*-

from common.utils import LogUtil
from web_server.models.group import Group
from web_server.models.db_client import DBClient
from web_server.device_proxy import DeviceProxy

logger = LogUtil.get_logger(__name__)

class GroupMgr:
    """用户组管理器"""

    def __init__(self, device_proxy: DeviceProxy, db_client: DBClient):
        self.device_proxy = device_proxy
        self.db_client = db_client

    def __del__(self):
        self.destroy()

    def destroy(self):
        self.db_client = None
        self.device_proxy = None